package com.ophelisis.actions.system;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/** <pre>
 * Class : com.ophelisis.actions.system.MainPage / MainPage.java
 * 	Define Class Object : 
 * <br>
 * </pre>
 * @author hlee / apexcns,Inc.
 * @version 1.0
 * @see javadoc
 * @since 2013. 01. 17.
 */
@Controller
public class MainPage {
	private Log log = LogFactory.getLog(this.getClass());
	private static final String _LogPrefixStr = "MainPage Log> ";
	
	@RequestMapping(value={"admin.action","mainPage.action"})
	public ModelAndView mainPage(
			HttpServletRequest request,
			HttpServletResponse response,
			@RequestParam(value="_groupId", defaultValue="0") String sMenuGroupId,
			@RequestParam(value="_menuId", defaultValue="0") String sMenuId,
			@RequestParam(value="_menuNm", defaultValue="") String sMenuNm,
			@RequestParam(value="_menuAuth", defaultValue="0") String sUserMenuAuth) throws Exception {
		ModelAndView mav = new ModelAndView();
		
		log.debug(_LogPrefixStr + "|" + "------------------------------------------------------------------------------------");
		log.debug(_LogPrefixStr + "|" + " MainPage called !!!");
		log.debug(_LogPrefixStr + "|" + "------------------------------------------------------------------------------------");
		
		mav.addObject("_groupId", sMenuGroupId);
		mav.addObject("_menuId", sMenuId);
		mav.addObject("_menuNm", sMenuNm);
		mav.addObject("_menuAuth", sUserMenuAuth);
		
		mav.setViewName("/WEB-INF/jsp/system/mainPage.jsp");
		return mav;
	}
}

